<%
  /*
     文件名称：添加新闻
     作者：陈启明
     创建时间：2010-02-03
     修改时间：2010-02-03
  */
%>
<%@page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="java.util.*"%>

<%
	request.setCharacterEncoding("UTF-8");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>addnews.html</title>
	<script language="javascript">
		/*输入验证*/
		function check(){
			if(document.formaddnews.newstitle.value==""){
				alert("请输入新闻标题！");			
				return false;
			}else if(document.formaddnews.Newscontent.value==""){
				alert("请输入新闻内容！");			
				return false;
			}else{
    		 alert("成功添加一条新闻信息！");
     		return true;
   			}	
		}
	</script>
    <link href="../css/admin.css" rel="stylesheet" type="text/css">
  </head>
  <body>
  	<div style="margin-left:10%; margin-top:20px; width:620px;">
  	  <%--     新闻-添加      --%>
	<form name="formaddnews" onSubmit="return check() " method="post" action="../manage/saveNews.jsp">
    <table width="100%" bgcolor="#F5F5DC" class="table">
      <tr class="td">
        <td colspan="2" style="background-color:#6699FF; color:#FFFFFF;"><b>添加新闻信息</b></td>
      </tr>
      <tr class="td">
        <td width="12%">新闻标题：</td>
        <td width="88%">
          <input name="newstitle" type="text" style="width:350px; height:18px; border-left:groove">
        </td>
      </tr>
      <tr class="td">
        <td>新闻内容：</td>
        <td>
          <textarea name="Newscontent" cols="55" rows="10" style="border-left:groove"></textarea>
        </td>
      </tr>
      <tr class="td">
        <td>&nbsp;</td>
        <td> <input name="Submit" type="submit" class="btn" value="提交" >
        <input name="reset" type="reset" class="btn" value="重置"></td>
      </tr>
    </table>
	</form>
	</div>
    <br>
  </body>
</html>
